home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 52
/
Aminet 52 (2002)(GTI - Schatztruhe)[!][Dec 2002].iso
/
Aminet
/
dev
/
c
/
CLib-SDI.lha
/
CLib-SDI
/
ReadMe
< prev
Wrap
Text File
|
2002-10-27
|
3KB
|
93 lines
The Test.c tool can be compiled like any normal program. No special handling
for different compilers needed.
SAS:
Call "smake" if you are in libsource directory to make the library.
"smake 020", "smake 030", "smake 040" and "smake 060" can be used to make
processor specific versions (which has no use for this example).
"smake ALL" produces all versions.
GCC:
Call make -f makefile.gcc in libsource directory. There is currently no
MorphOS support due to missing register specification in function header.
VBCC:
Get a make utility (from GNUC, SAS, ...) and call
make -f makefile.vbcc in libsource directory.
VBCC for MorphOS:
Get a make utility (from GNUC, SAS, ...) and call
make -f makefile.vbccMOS in libsource directory.
MaxonC (HiSoftC) 3.x:
Load makefile.Maxon, set following linker options: without startup code and
large data model. Add /include/C/ to include path.
Now make the library.
MaxonC 4.x:
Load project file, change include-paths and work directory (all made in
RAM:). Create library.
StormC:
a) Load project file, change include-paths and work directory (all made in
RAM:). Create library.
b) Change include paths in makefile.Storm. call make -f makefile.storm.
Supported defines, you may set in your makefile or project:
BASE_GLOBAL:
This must be set, if your compiler does not support calling library functions
with local library bases (e.g. MaxonC++).
_M68020:
If you compile for 68020 CPU. SAS-C sets this automatically.
_M68030:
If you compile for 68030 CPU. SAS-C sets this automatically.
_M68040:
If you compile for 68040 CPU. SAS-C sets this automatically.
_M68060:
If you compile for 68060 CPU. SAS-C sets this automatically.
__MORPHOS__
In case you do the MorphOS version.
Some words about the sources:
1) The sources use 2 different library bases: "struct ExampleBaseP" for
internal use and "struct ExampleBase" for external use. This allows to hide
internal variable fields from users eyes. But always keep the ExampleBase
equal to the public part of ExampleBaseP. They must match. The private parts
may be changed whenever you want.
general structure of ExampleBaseP:
- public entries, always equal to ExecBase
- place, where new public entries are added in future versions
- the private entries (can be modified in every release)
2) The library functions get an LIB prefix always. But whenever you call them
in your own library you use normal name without prefix. This means the library
interface is used an possible patches or workarounds will work for internal
calls also.
3) The included source use <proto/xxx.h> instead of any compiler specific
call method. Proto-files for required libraries, which support nearly all
used compilers are included in include2 directory. Install them, if necessary.
All the include files can be generated using fd2pragma from
Aminet/dev/misc/fd2pragma.lha.
4) In LibInit.c the only functions, which may be modified are MakeGlobalLibs(),
CloseLibraries() and the middle part of LibInit(). Normally there should be
no cause to modify any other stuff there.
5) Some compilers have problems with "struct UtilityBase * UtilityBase", as
they define it as "struct Library *". Fix the related <proto/utility.h> file
by taking files created with fd2pragma.
6) Currently there is no gcc-MorphOS version of the library, as I found no
easy way to implement this without to much compiler specifics and include
patches. If there is an easy way, please tell me how to do.